package kr.hkit.powerjava.chapter07;

public class CarTest {

	public static void main(String[] args) {
		Car myCar = new Car("blue", 100, 5);

		Object Car = myCar;
		System.out.println(myCar);
		System.out.println(Car);
		
		/*
		// myCar.print(); --> (null, 0, 0)

		myCar.setColor("red");
		myCar.setGear(5);
		myCar.setSpeed(100);

		// myCar.print();
		System.out.println(myCar);// 이경우 ToString이 호출됨

		Car myCar2 = new Car("blue", 20, 3);

		System.out.println(myCar2);

		myCar2 = myCar;
		System.out.println(myCar2);

		myCar2.setColor("blue");
		System.out.println(myCar2);
		System.out.println(myCar);
*/
	}
}
